<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

<body>
    <template id="my-temp">
        <div>
            <hr>
            <slot name="my-text">My default text</slot>
        </div>
    </template>
    <hey-there name="Potch" id="my-comp">
        <span slot="my-text">Let's have some different text!</span>
    </hey-there>

    <script src="./index.js"></script>
    <script>
        let dom = document.querySelector('#my-comp');
        console.error(dom);
        let domShadowRoot = dom.shadowRoot;
        console.error(domShadowRoot);
        setInterval(() => {

            dom.setAttribute('name', random(50, 200))
        }, 3000);

        function random(min, max) {
            return Math.floor(Math.random() * (max - min + 1) + min);
        }
    </script>
</body>

</html>